<?php

include("functions.php");

$username = $_POST['username'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$access = $_POST['access'];

$sql = "INSERT INTO `user` (`FirstName`, `LastName`, `Email`, `User`,`Password`, `Webpage`, `Access`,`Session`) VALUES ('{$firstname}', '{$lastname}', '{$email}', '{$username}', md5('{$password}'), 'ADMIN','{$access}', NULL);";
mysql_query($sql);


//mysql_free_result($sql);

mysql_close($link);

header("Refresh: 1; URL=adminPanel.php");